package cn.fy.erupt.model.work;

import javax.persistence.*;
import xyz.erupt.annotation.*;
import xyz.erupt.annotation.sub_erupt.*;
import xyz.erupt.annotation.sub_field.*;
import xyz.erupt.annotation.sub_field.sub_edit.*;
import xyz.erupt.upms.model.base.HyperModel;
import xyz.erupt.jpa.model.BaseModel;
import java.util.Set;
import java.util.Date;

@Erupt(name = "工作周报项")
@Table(name = "t_work_weekly_item")
@Entity
public class WeeklyItem extends HyperModel {

        @EruptField(
                views = @View(
                        title = "开始日期"
                ),
                edit = @Edit(
                        title = "开始日期",
                        type = EditType.DATE, search = @Search, notNull = true,
                        dateType = @DateType
                )
        )
        private Date startDate;

        @EruptField(
                views = @View(
                        title = "结束日期"
                ),
                edit = @Edit(
                        title = "结束日期",
                        type = EditType.DATE, search = @Search, notNull = true,
                        dateType = @DateType
                )
        )
        private Date endDate;

        @EruptField(
                views = @View(
                        title = "工作内容"
                ),
                edit = @Edit(
                        title = "工作内容",
                        type = EditType.HTML_EDITOR, search = @Search, notNull = true,
                        htmlEditorType = @HtmlEditorType(HtmlEditorType.Type.UEDITOR)
                )
        )
        private @Lob String content;

}
